# models.py
from django.db import models

class Bizhichu(models.Model):
    id = models.AutoField(primary_key=True)
    item_name = models.CharField(max_length=255, null=True, blank=True)
    iterm_id = models.IntegerField(null=True, blank=True)
    p_id = models.IntegerField(null=True, blank=True)
    create_time = models.DateTimeField(auto_now_add=True)
    is_delete = models.IntegerField(default=0)

    class Meta:
        db_table = 't_bizhichu'
        verbose_name = 'Business Expenditure'
        verbose_name_plural = 'Business Expenditures'


class BizhichuData(models.Model):
    id = models.AutoField(primary_key=True)
    fk_id = models.IntegerField(null=True, blank=True)
    school_name = models.CharField(max_length=255, null=True, blank=True)
    year = models.IntegerField(null=True, blank=True)
    month = models.IntegerField(null=True, blank=True)
    value = models.DecimalField(max_digits=12, decimal_places=3, null=True, blank=True)
    create_time = models.DateTimeField(auto_now_add=True)
    is_delete = models.IntegerField(default=0)
    column_num = models.IntegerField(default=0)
    type = models.IntegerField(default=1)

    class Meta:
        db_table = 't_bizhichudata'
        verbose_name = 'Business Expenditure Data'
        verbose_name_plural = 'Business Expenditure Data'
